<template>
	<headertop title="中医辨证" str="orderlist" str1="oridei"></headertop>
	<view class="zypage">
		<image :src="_static('/images/Group 11692@2x.png')" mode="widthFix"></image>
	</view>
	<view class="fixed">
		<view class="btn" @click="gopage">
			开始测评
		</view>
		<view class="ceping" @click="gopage1">
			<image src="/static/images/微信图片_20250805145038.png" mode=""></image>
			<span>测评记录</span>
		</view>
		<userlogin @updata="userinfoinit" ref="denglu"></userlogin>
	</view>
</template>

<script setup>
	import userlogin from '@/components/getuser/getuser.vue'
	import headertop from '@/components/header.vue'
	import ulm, {
		$api
	} from '@/ulm';
	import {
		_static
	} from '@/ulm/utils/url.js'
	import {
		getCurrentInstance,
		onMounted,
		ref,
		reactive
	} from 'vue'
	import {
		setToken,
		getToken
	} from '@/ulm/utils/auth';
	const userobj = ref({})
	const denglu = ref(null)
	async function userinfoinit() {
		const res = await $api.userinfo()
		if (res.code == 1) {
			userobj.value = res.data
		}
	}

	function gopage1() {
		if (!getToken()) {
			denglu.value.DengLu()
			return
		}
		uni.navigateTo({
			url: '/sub_index/index/bzrecord'
		})
	}

	function gopage() {
		if (!getToken()) {
			denglu.value.DengLu()
			return
		}
		uni.navigateTo({
			url: '/sub_index/index/zhongyibianzheng'
		})
	}
</script>

<style lang="scss">
	.zypage {
		width: 100%;
		overflow: hidden;

		image {
			width: 100%;
		}
	}

	.fixed {
		width: 100%;
		position: fixed;
		bottom: 0%;
		display: flex;
		align-items: center;
		flex-direction: column;

		.btn {
			width: 686rpx;
			height: 82rpx;
			border-radius: 12rpx 12rpx 12rpx 12rpx;
			text-align: center;
			line-height: 82rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color: #FFFFFF;
			background: #AF8029;
		}

		.ceping {
			display: flex;
			align-items: center;
			font-size: 32rpx;
			color: #FFFFFF;
			margin-bottom: 80rpx;
			margin-top: 20rpx;

			image {
				width: 30rpx;
				height: 30rpx;
				margin-right: 10rpx;
			}
		}
	}
</style>